# $Id: Makefile.am 28 2012-03-30 15:11:05Z dubkat $
# 
# okay so i've flattened out the build stuff here.
# this is really for the best since so many things depend
# on each other now..

ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = 1.10 foreign subdir-objects color-tests no-installinfo no-installman -Wall -Werror

prefix		= @prefix@
libcoredir 	= @libdir@
modulesdir	= @moduledir@/autoload
coredir		= @moduledir@
servicesdir	= @moduledir@/autoload


AM_CFLAGS = $(WARNFLAGS)

ratbox_monitor_SOURCES = \
	src/config.c \
	src/logger.c \
	src/database.c \
	src/worker.c \
	src/seedrand.c \
	src/numerics.c \
	src/dnsbl.c \
	src/fetch.c \
	src/main.c
	
	
bin_PROGRAMS = ratbox-monitor
sysconf_DATA = monitor.conf.example

if MINGW
EXTRA_FLAGS = -no-undefined -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*'
endif


SUBDIRS = libraries/sqlite libraries/libpcre libraries/libconfig libraries/libcares libraries/libratbox

if !STATIC_MODULES

ratbox_monitor_LDADD = libraries/sqlite/libsqlite3.la libraries/libpcre/libpcre.la libraries/libconfig/lib/libconfig.la libraries/libcares/libcares.la libraries/libratbox/src/libratbox.la
ratbox_monitor_LDFLAGS = $(EXTRA_FLAGS) -dlopen self

else

ratbox_monitor_LDADD = libraries/sqlite/libsqlite3.la libraries/libpcre/libpcre.la libraries/libconfig/lib/libconfig.la libraries/libcares/libcares.la libraries/libratbox/src/libratbox.la -lsqlite3 $(DLOPEN)

endif



